package array;

public class ArrayDemo01 {
    public static void main(String[] args) {
        int[] nums;//定义 int nums[];

        nums = new int[10]; //定义大小

        for (int i = 0; i < nums.length; i++) {
            nums[i] = i+1;
        }

        for (int num : nums) {
            System.out.println(num);
        }

        System.out.println(~2);//整数默认用int类型（32位）以补码的形式存储
    }
}
